import HTMLTestRunner_cn
import yagmail
class Tools():
    def report(self):
        r = HTMLTestRunner_cn.HTMLTestRunner(open(r'D:\2210A-Gao6\yuekao0617\test.html','wb'),
                                             title='客户关系管理系统测试报告')
        return r
    def email(self):
        mail = yagmail.SMTP(user='2829138788@qq.com',password='ktsrrzrhxlycdfca',host='smtp.qq.com')
        mail.send(to='2829138788@qq.com',subject='测试报告',
                  contents=['客户关系管理系统测试报告',r'D:\2210A-Gao6\yuekao0617\test.html'])
        mail.close()